The OS-specific implementation is necessary because according to the docs, [DirEntry::metadata is fast on Windows](https://doc.rust-lang.org/stable/std/fs/struct.DirEntry.html#method.metadata). Note `is_executable` is used elsewhere so we can't change that directly to accept `DirEntry` instead of `Metadata`.